import bsinRequest from '../utils/bsinRequest';

// 获取流程实例列表
export const getPageListProcessInstance = (params: object) => {
  return bsinRequest('/getPageListProcessInstance', {
    serviceName: 'BsinAdminProcessInstanceService',
    methodName: 'getPageListProcessInstance',
    bizParams: {
      ...params,
    },
  });
};

// 挂起流程实例
export const suspendProcessInstance = (params: object) => {
  return bsinRequest('/suspendProcessInstance', {
    serviceName: 'BsinAdminProcessInstanceService',
    methodName: 'suspendProcessInstance',
    bizParams: {
      ...params,
    },
  });
};

// 激活流程实例
export const activateProcessInstance = (params: object) => {
  return bsinRequest('/activateProcessInstance', {
    serviceName: 'BsinAdminProcessInstanceService',
    methodName: 'activateProcessInstance',
    bizParams: {
      ...params,
    },
  });
};

// 激活流程实例
export const getMyProcessInstancePageList = (params: object) => {
  return bsinRequest('/getMyProcessInstancePageList', {
    serviceName: 'BsinAdminProcessInstanceService',
    methodName: 'getMyProcessInstancePageList',
    bizParams: {
      ...params,
    },
  });
};
